package com.xhtt.modules.inspection.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xhtt.modules.inspection.entity.InsClassesTeamDetail;
import com.xhtt.modules.inspection.entity.InsTaskStep;
import com.xhtt.modules.sys.entity.SysUserEntity;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 巡检-排班管理-班组
 * </p>
 *
 * @author xj
 * @since 2019-01-29
 */
public interface IInsClassesTeamDetailService extends IService<InsClassesTeamDetail> {

    InsClassesTeamDetail getByTaskDate(LocalDateTime taskDate);

    InsClassesTeamDetail getByNow();

    // 获取当前用户的排班日期
    List<String> getCurrentUserClasses(SysUserEntity user, Integer taskId);

    // 0未排班1日班2夜班
    int getShiftTypeByDate(LocalDateTime dateTime, Integer teamId);

    List<LocalDateTime> getDatesByTeamId(Integer teamId);

    List<InsClassesTeamDetail> queryClassesByMonth(String month);

    // 根据日期和班组id判断日班还是夜班
    int getShiftTypeByDate(String date, Integer teamId);

    // 根据任务id获取前一次排班的日期
    InsClassesTeamDetail getAgoByTaskId(Integer taskId);

}
